﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ToolS
{
    public class FileHelper
    {
        public static string GetFileString(string path)
        {            
            FileStream fs = File.OpenRead(path);
            StreamReader sr = new StreamReader(fs);
            string requestXML = sr.ReadToEnd();
            sr.Close();
            fs.Close();
            return requestXML;
        }
        public static void WriteFile(string path, string ccc)
        {
            FileStream fs = File.OpenWrite(path);
            StreamWriter sw = new StreamWriter(fs);
            sw.Write(ccc);
            sw.Close();
            fs.Close();
        }
    }
    public class fileEntity
    {
        public string path { get; set; }
        public string name { get; set; }
        public string extension { get; set; }
    }
}
